<?php

namespace App\Services\Draw\DrawConst;

use function Symfony\Component\HttpClient\Response\select;

class CacheKey
{
    const USER_DATE_PUT_RECORD = "draw:user:put:date";
    const USER_WEEK_PUT_RECORD = "draw:user:put:week";
    const POOL_DATE_PUT_RECORD = "draw:pool:put:date";
    const POOL_WEEK_PUT_RECORD = "draw:pool:put:week";
    const POOL_TOP_COUNT = "draw:pool:top_count";
    const POOL_BIG_COUNT = "draw:pool:big_count";
    const USER_LAST_BIG_DRAW_COUNT = "user:lastBigDrawCount";
    const POOL_ROUND = "draw:pool:round";
    const DATE_RANK = "draw:rank:date";
    const WEEK_RANK = "draw:rank:week";
    const MONTH_RANK = "draw:rank:month";

    const USER_STATISTICS_COUNT_DATE = "draw:userStatistics:date";
    const USER_STATISTICS_COUNT_WEEK = "draw:userStatistics:week";
    const USER_STATISTICS_COUNT_MONTH = "draw:userStatistics:month";
    const USER_STATISTICS_COUNT_YEAR = "draw:userStatistics:year";
    const POOL_BIG_PRIZE_LIMIT = "draw:pool:bigPrizeLimit";
    const POOL_TOP_PRIZE_LIMIT = "draw:pool:topPrizeLimit";
    const POOL_CRITICAL_PRIZE_LIMIT = "draw:pool:criticalPrizeLimit";
    const CRITICAL_PRIZE_LIMIT = "draw:criticalPrizeLimit";

    const TEMPLATE_GIFT_CONFIG = 'template:giftConfig';
    const DRAW_CHECK = 'draw_check';

    public static function getGiftConfigKey($prefix)
    {
        return $prefix.':'.self::TEMPLATE_GIFT_CONFIG;
    }

    public static function getDrawCheckKey($prefix)
    {
        return $prefix.':'.self::DRAW_CHECK;
    }

    public static function getFragmentForceTriggerKey($prefix)
    {
        return $prefix.':force_trigger_info:'.date('Ymd');
    }

    public static function getFragmentPoolNumsKey($prefix)
    {
        return $prefix.':fragment_pool:nums';
    }

    public static function getAppointGiftKey($prefix)
    {
        return $prefix.':appoint_gift';
    }

}
